#include <ge/ge.hpp>
#include <ge/ms3d/ms3d.hpp>

using namespace ge;

class MyScene:public Scene3D{
public:

	Font font;

	virtual void on_init(){
	
		if (font.load("data/font/arial.ttf"))
			cout << "font load : ok\n";
		else
			cout << "font load : error\n";
	
		skybox.enable = true;
		skybox.load("miramar");

		MS3D::import(model["model"],"ninja.ms3d");
		model["model"].set_matrix(scale(model["model"].matrix(),vec3(0.1f,0.1f,0.1f)));
		model["model"].animation.set_play(0.04,0.56,true);
		
		MS3D::import(model["model1"],"ninja.ms3d");
		model["model1"].set_matrix(scale(model["model1"].matrix(),vec3(0.1f,0.1f,0.1f)));
		model["model1"].set_matrix(translate(model["model1"].matrix(),vec3(5.0f,0.0f,0.0f)));
		model["model1"].animation.set_play(0.04,0.56,true);
		
	}
	
	virtual void on_draw(){
		font.cursor_x = 0;
		font.cursor_y = 0;
		font.print_mode();
		font.put_string(L"РОССИЯ ВПЕРЕД !!!");
		//font.put_string(System::device().timer.fps_string);
	}

	float n;
	
	virtual void on_frame(){
		model["model"].animation.play();
		model["model1"].animation.play();
		event.push(Message(GE_MESSAGE_REDRAW));
	}

	MyScene(){
		n=0;
	}

};

int main(){

	System::play(new MyScene);
	return 0;
}
